﻿package com.mod.engine {
	
	import flash.display.MovieClip;
	import com.calefk.util.Generic;

	public class Hud {
		
		private var mClip:MovieClip;
		
		public function Hud(clip:MovieClip) {
			mClip = clip;
		}
		
		public function setScore(value:Number):void {
			mClip.txtScore.text = value + " PTS";
		}
		
		public function setPosition(value:Number):void {
			mClip.txtPosition.text = value + "";
		}
		
		public function setName(value:String):void {
			mClip.txtName.text = value.toLocaleUpperCase() + "";
		}
		
		public function setTime(mTimeTotal:int):void {
			var format:Object = Generic.getFormatTime(mTimeTotal);
			var minutes:String = Generic.fillCharLeft(format.minutes , "0" , 2);
			var seconds:String = Generic.fillCharLeft(format.seconds , "0" , 2);
			mClip.txtTime.text = minutes + ":" + seconds;
		}
	}
}